﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Configuration;
using System.Globalization;
using System.Threading;
using System.Web.UI;

namespace eStore
{
    public class MyBasePage : Page
    {
        /// <summary>
        /// Initializes a new instance of the MyBaseUserControl class.
        /// </summary>
        protected override void InitializeCulture()
        {
            string culture = String.Empty;
            string lang = String.Empty;
            if (Session["lang"] != null)
            {
                lang = Convert.ToString(Session["lang"]);
            }
            else
            {
                lang = ConfigurationManager.AppSettings["DefaultLanguage"];
            }
            if (lang.ToLower().CompareTo("vi") == 0)
            {
                culture = "vi-VN";
            }
            else if (lang.ToLower().CompareTo("en") == 0)
            {
                culture = "en-US";
            }
            CultureInfo ci = new CultureInfo(culture);
            Thread.CurrentThread.CurrentCulture = ci;
            Thread.CurrentThread.CurrentUICulture = ci;
        }
        /// 

    }
}